package com.cmys.money.cloudshop.model.product;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="tb_productextend")
public class ProductExtend implements Serializable{

	private static final long serialVersionUID = 8435824290425438069L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(length = 20, nullable = false)
	private Long id;
	
	@Column(length = 20, nullable = false)
	private String filedname;
	
	@Column(length = 100, nullable = false)
	private String filedvalue;
	
	@ManyToOne(cascade = CascadeType.REFRESH, optional = false)
	@JoinColumn(name = "productinfo_id")
	private ProductInfo productinfo;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getFiledname() {
		return filedname;
	}

	public void setFiledname(String filedname) {
		this.filedname = filedname;
	}

	public String getFiledvalue() {
		return filedvalue;
	}

	public void setFiledvalue(String filedvalue) {
		this.filedvalue = filedvalue;
	}

	public ProductInfo getProductinfo() {
		return productinfo;
	}

	public void setProductinfo(ProductInfo productinfo) {
		this.productinfo = productinfo;
	}
	
}
